/**
  ******************************************************************************
  * @file    FanDrvParam.h
  * @author  Silan - MC Team
  * @version 1.0.0
  * @date    2017/08/14
  * @brief   FAN Driver Parameter Header File
  * @details None
  * @note    None
  ******************************************************************************
  * @attention
  * THE PRESENT SOFTWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
  * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME.
  * AS A RESULT, SILAN MICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY DIRECT,
  * INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE
  * CONTENT OF SUCH SOFTWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING
  * INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
  *
  ******************************************************************************
  * Change History
  * -# 2017/08/14 | v1.0.0 | Wangjianlong | Creat file.
  *
  *
  *
  *
  *
  *
  *
  *
  *
  ******************************************************************************
  */

/*******************************************************************************
 * Define to prevent recursive inclusion
 ******************************************************************************/
#ifndef __FAN_DRV_PARAM_H__
#define __FAN_DRV_PARAM_H__


/*******************************************************************************
 * Include section
 ******************************************************************************/
#include "stdint.h"

/*******************************************************************************
 * Typedefs, structs and enums
 ******************************************************************************/

/**
  * @brief FAN driver parameters structure definition
  */
struct FAN_DRV_PARAM_s{
  uint16_t  u16PwmFreq;
  float     fPwmDtUS;
  uint8_t   u8PolePairs;
  uint8_t   u8Rs;
  uint16_t  u16Ld;
  uint16_t  u16Lq;
  float     fJ;
  uint8_t   u8Ke;
  float     fBaseFreqMec;
  uint16_t  u16BaseVolt;
  float     fBaseCurr;
  uint8_t   u8OverModeEn;
  uint8_t   u8SingleShuntEn;
  float     fDampedCoeff4SpdPI;
  float     fBandWidth4SpdPI;
  float     fDampedCoeff4CurrPI;
  uint16_t  u16BandWidth4CurrPI;
  float     fDampedCoeff4PllPI;
  float     fBandWidth4PllPI;
  uint8_t   u8FilterCoeff4Spd;
  float     fFreeSpdHighPU;
  float     fFreeSpdMidPU;
  float     fFreeSpdLowPU;
  float     fStartupSpd0PU;
  float     fStartupSpd1PU;
  float     fStartupCurr;
  float     fStartupRmp0;
  float     fStartupRmp1;
  float     fAccRmp;
  float     fDecRmp;
  float     fMaxSpeedPU;
  float     fMinSpeedPU;
  float     fOCVal4Rms;
  float     fOCVal4Peak;
  uint8_t   u8OPVal4Rms;
  float     fMaxIsVal;
  float     fSmpDly;
  float     fMinPulse;
  float     fOpenLoopSpd;
};

/*******************************************************************************
 * Prototypes of the functions
 ******************************************************************************/
extern void FanDrvParamDefault(struct FAN_DRV_PARAM_s *ptr);

#endif /* __FAN_DRV_PARAM_H__ */
/*---------------------------------- End of the file ---------------------------------*/

